import java.util.zip.*;
import java.nio.ByteBuffer;

//designed for testing methods out

public class ScratchPaper
{
    public static void main (String [] args)
    {
        ByteBuffer z = ByteBuffer.allocate(9);
        byte [] test = new byte [5];
        test [0] = '0';
        test [1] = '0';
        test [2] = '0';
        test [3] = '0';
        test [4] = '0';
        z.put(test);
        
        long CRCvalue;
        CRC32 x = new CRC32();
        x.update (test);
        CRCvalue = x.getValue();
        //System.out.println (CRCvalue);
        z.putLong (CRCvalue);
        /*byte num = 1;
        for (int y = 0; y < 8; y ++)
        {
            System.out.println (num);
            num >>= 1;
        }*/
        byte [] something = new byte [9];
        something = z.array();
        for (int a = 0; a < something.length; a ++)
        {
            System.out.println (something [a]);
        }
        System.out.println (x.getValue());
        x.reset();
        x.update(something);
        System.out.println (x.getValue());
    }
}
